﻿@model etracks.Web.EnvironmentRegistrationViewModel

<div class="form-group">
    <label for="input_name" class="col-sm-2 control-label">Name</label>
    <div class="col-sm-8">
        <input type="text" class="form-control" id="input_name" name="name" placeholder="eg. Name of Environment" value="@Model.Name" autocomplete="off">
    </div>
</div>

<div class="form-group">
    <label for="input_name" class="col-sm-2 control-label">@Html.ActionLink("Project", "List", "Project", null, null)</label>
    <div class="col-sm-8">
        <select class="form-control" id="select_project" name="projectid">
            @if (Model.ProjectList.Count != 1)
            {
                <option value="">No selection</option>
            }
            @foreach (etracks.EntityModels.Project p in Model.ProjectList)
            {
                <option value="@p.Id" @DataHelper.IsSelected(p.Id, Model.ProjectId) >@p.Name</option>
            }
        </select>
    </div>
</div>

<div class="form-group">
    <label for="input_name" class="col-sm-2 control-label">Association</label>
    <div class="col-sm-8">
        @Html.ActionLink("Resource", "List", "EnvironmentResource", new { id = Model.Id }, new { @class = "btn btn-primary" })
    </div>
</div>